package com.xdja.study;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

@Configuration
public class AppConfiguration {
    @Autowired
    Environment environment;

    public int httpPort() {
        return environment.getProperty("vertx.port", Integer.class, 8080);
    }

    public String redisHost()  {
        return environment.getProperty("redis.host", String.class, "127.0.0.1");
    }

    public int redisPort()  {
        return environment.getProperty("redis.port", Integer.class, 6379);
    }

    public String fileUrl() {
        return environment.getProperty("file.url", String.class, "/Users/wjy/Desktop/111.txt");
    }

    public String httpUrl() {
        return environment.getProperty("http.url", String.class, "http://192.168.7.236:8219/ftr-web/admin/file/indexQuery.do?core=smx&indexPath=0/1&page=1&pageSize=10");
    }

    public int workerPoolSize() {
        return environment.getProperty("WorkerPoolSize", Integer.class, 10);
    }
}
